{{define "book_list.html"}}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title> 书籍列表 </title>
</head>
<body>

    <div><a href="/book/new">添加新书</a></div>

   <table border=1>
       <thead>
           <tr>
               <th>ID</th>
               <th>title</th>
               <th>price</th>
               <th>操作</th>
           </tr>
       </thead>
       <tbody>
           {{range .data}}
                <tr>
                    <td>{{.ID}}</td>
                    <td>{{.Title}}</td>
                    <td>{{.Price}}</td>
                    <td>
                        <a href="/book/delete?id={{.ID}}">删除</a>
                        <a href="/book/edit?id={{.ID}}">编辑</a>
                    </td>
                </tr>
           {{end}}
       </tbody>
   </table>
    
</body>
</html>

{{end}}